// ====================================================================
// 	The Main Menu
//
//  (c) 2003, Epic Games, Inc.  All Rights Reserved
//	Updated by Ron Prestenback
// ====================================================================

class BTModMainMenu extends UT2K4GUIPage;


var automated 	GUIButton	b_Play, b_Settings, b_Quit;
var automated   GUIImage    bg_Image;
var automated   GUILabel	lb_TestMsg;
var localized   string      TestMsg;

function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
	Super.InitComponent(MyController, MyOwner);
	MyController.bModAuthor = true;
	MyController.SaveConfig();
	lb_TestMsg.Caption = TestMsg;
}

function bool ButtonClick(GUIComponent Sender)
{
	if (Sender == b_Play)
	{
		Console(Controller.Master.Console).DelayedConsoleCommand("open TankMap");
		Controller.CloseAll(false,True);
	}
	else if (Sender == b_Settings)
    {
    	Controller.OpenMenu(Controller.GetSettingsPage());
    }
    else if (Sender == b_Quit)
	{
    	Controller.OpenMenu(Controller.GetQuitPage());
    }
	return true;
}


defaultproperties
{
	Begin Object class=GUILabel name=lbTestMsg
		FontScale=FNS_Large
        WinWidth=1
		WinLeft=0
		WinTop=0
		Caption="::battletanks"
		TextColor=(R=200,G=0,B=0)
	End Object

	Begin Object Class=GUIButton Name=PlayButton
	    FontScale=FNS_Small
		StyleName="TextButton"
		Caption="Play"
        CaptionEffectStylename="TextButtonEffect"
        CaptionAlign=TXTA_Left
		Hint="Play the map"
		OnClick=ButtonClick
		WinWidth=0.574135
		WinHeight=0.075000
		WinLeft=0.424711
		WinTop=0.705859
		bFocusOnWatch=true
        TabOrder=4
		bUseCaptionHeight=true
	End Object

	Begin Object Class=GUIButton Name=SettingsButton
	    FontScale=FNS_Small
		StyleName="TextButton"
		Caption="Settings"
        CaptionEffectStylename="TextButtonEffect"
        CaptionAlign=TXTA_Left
		Hint="Change your controls and settings"
		OnClick=ButtonClick
		WinWidth=0.580478
		WinHeight=0.075000
		WinLeft=0.424711
		WinTop=0.800327
		bFocusOnWatch=true
        TabOrder=5
		bUseCaptionHeight=true
	End Object

	Begin Object Class=GUIButton Name=QuitButton
	    FontScale=FNS_Small
		StyleName="TextButton"
		Caption="Exit BattleTanks"
        CaptionEffectStylename="TextButtonEffect"
        CaptionAlign=TXTA_Left
		Hint="Exit the game"
		OnClick=ButtonClick
		WinWidth=0.526767
		WinHeight=0.075000
		WinLeft=0.424711
		WinTop=0.887567
		bFocusOnWatch=true
        TabOrder=6
		bUseCaptionHeight=true
	End Object

    Begin Object Class=GUIImage Name=ImgBTLogo
		Image=material'BTMenus.Logos.Logo'
		ImageStyle=ISTY_Scaled
		ImageColor=(R=255,G=255,B=255,A=255)
		WinWidth=1.000000
		WinHeight=0.666667
		WinLeft=0.000000
		WinTop=0.000000
	End Object

    bg_Image=ImgBTLogo
	b_Settings=SettingsButton
	b_Play=PlayButton
	b_Quit=QuitButton
	lb_TestMsg=lbTestMsg

	WinWidth=1.0
	WinHeight=1.0
	WinTop=0.0
	WinLeft=0.0

	bRenderWorld=False
	bAllowedAsLast=true
	bDisconnectOnOpen=true
}
